/**
  ******************************************************************************
  * @file    ssd1306.h
  * @author  YANDLD
  * @date    2015.12.25
  * @brief   www.beyondcore.net   http://upcmcu.taobao.com 
  ******************************************************************************
  */

#ifndef __oled__
#define __oled__

#include <stdint.h>
void i2c_pin_init(void );
void scL_H(void);
void scl_l(void);
void sda_h(void);
void sda_l(void);
void i2c_start(void);
void i2c_stop(void);
void i2c_wait_ack(void);
void i2c_sendbyte(unsigned char i2c_byte);
void oled_writecmd(unsigned char cmd);
void oled_writedata(unsigned char data);
void oled_setpos(unsigned char x,unsigned char y);
void oled_diplay_on(void); 
void oled_display_off(void);
void oled_clear_all(void);
uint32_t oled_pow(unsigned char  m,unsigned char n);
void oled_showchar(unsigned char x,unsigned char y,unsigned char chr,unsigned char Char_Size);
void oled_shownum(unsigned char x,unsigned char y,uint32_t num,unsigned char len,unsigned char size2);
void oled_showstring(unsigned char x,unsigned char y,unsigned char *chr,unsigned char Char_Size);
void oled_init(void);
void OLED_ShowFloat(uint8_t  x,uint8_t y,float math,uint8_t dotfronter,uint8_t dotlater,uint8_t size);
void OLED_ShowDecimalNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size);
uint32_t mypow(uint8_t  m,uint8_t n);
void OLED_IMG_1(const uint8_t * img1buff);
void OLED_CLS_IMG_GRAM(void);
void OLED_line(const uint8_t  line[60]);
void OLED_finished_img(void);
#endif

